/*
 *接口编写处...
*如果接口需要做Action的权限验证，请在Action上使用属性
*如: [ApiActionPermission("tb_project_type_template",Enums.ActionPermissionOptions.Search)]
 */
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Http;
using MYData.Entity.DomainModels;
using MYData.System.IServices;
using System.Net;
using MYData.Core.Utilities;
using Microsoft.AspNetCore.Authorization;

namespace MYData.System.Controllers
{
    public partial class tb_project_type_templateController
    {
        private readonly Itb_project_type_templateService _service;//访问业务代码
        private readonly IHttpContextAccessor _httpContextAccessor;

        [ActivatorUtilitiesConstructor]
        public tb_project_type_templateController(
            Itb_project_type_templateService service,
            IHttpContextAccessor httpContextAccessor
        )
        : base(service)
        {
            _service = service;
            _httpContextAccessor = httpContextAccessor;
        }
        /// <summary>
        /// 根据类型Id获取经费模板
        /// </summary>
        /// <param name="TypeId"></param>
        /// <returns></returns>
        [HttpGet, Route("GetTemplateList")]
        public async Task<IActionResult> GetTemplateList(string TypeId)
        {
            return Json(Service.GetTemplateList(TypeId));
        }
    }
}
